package com.ccp.dev.system.service;

import com.ccp.dev.core.basic.base.BaseService;
import com.ccp.dev.core.basic.util.UUIDUtils;
import com.ccp.dev.core.basic.web.query.QueryFilter;
import com.ccp.dev.core.util.BeanUtils;
import com.ccp.dev.core.util.StringUtil;
import com.ccp.dev.system.dao.SysWorkTimeDao;
import com.ccp.dev.system.model.SysWorkTime;
import net.sf.json.JSONObject;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;


/**
 * sys_worktime 信息操作服务类
 *
 * @author hw
 * @date 2019-10-15 14:38:01
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class SysWorkTimeService extends BaseService<SysWorkTime> {

    @Resource
    private SysWorkTimeDao sysWorkTimeDao;

    /**
     * 根据班次主键删除相应数据
     * @param settingId 班次主键
     * @return
     */
    public int delBySettingId(String settingId){
        int result = 0;
        if(StringUtil.isNotEmpty(settingId)){
             result = this.sysWorkTimeDao.delBySettingId(settingId);
        }
        return result;
    }

    /**
     * 根据班次主键获取相应的数据信息
     * @param settingId
     * @return
     */
    public List<SysWorkTime> queryListBySettingId(String settingId){
        return this.sysWorkTimeDao.queryListBySettingId(settingId);
    }

}
